package designmode.headfirst.observe.pull;

import java.util.Observable;
import java.util.Observer;

/**
 * 用户一
 * <p>Filename: designmode.headfirst.observe.pull.UserOne.java</p>
 * <p>Date: 2020-09-25 10:11.</p>
 *
 * @author <a href="mailto:liufuguo@qianmi.com">OF3581-刘富国</a>
 * @version 0.1.0
 */
public class UserOne implements Observer {
    @Override
    public void update(Observable o, Object arg) {
        if (o instanceof News) {
            System.out.printf("用户一收到%s的通知，参数为：%s%n", o, ((News) o).getNewsDetail());
        }

    }
}
